package com.suxin.plugin.intergration.manager;

import com.suxin.plugin.intergration.IntegrationConfiguration;
import com.suxin.plugin.intergration.manager.plugin.DefaultPluginManager;
import com.suxin.plugin.intergration.manager.plugin.PluginManager;

import java.nio.file.Paths;

/**
 * @author Tang
 * @classname DefaultManagerFactory
 * @description [  ]
 * @date 2022/6/26 23:05
 */
public class DefaultManagerFactory implements ManagerFactory {

    private IntegrationConfiguration configuration;

    public DefaultManagerFactory(IntegrationConfiguration configuration) {
        this.configuration = configuration;
    }

    @Override
    public PluginManager getPluginManager() {
        return new DefaultPluginManager(Paths.get(configuration.pluginPath()));
    }
}